<?
class SettingsComponent extends Object {

	var $name = 'Settings';
	var $controller = null;

	var $required = array('title', 'currency', 'currency_symbol');

	function startup(&$cont) {
		$this->controller =& $cont;
	}

	function findAll() {
		return $this->controller->Setting->find('list', array('fields'=>array('key','value')));
	}

	function beforeRender() {
		if (isset($this->controller)) {
			$this->controller->set('Settings', $this->findAll());
		}
	}

}
?>